'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {

    const articles = []

    for (let i = 1; i <= 10; i++) {
      const article = {
        title: `标题 ${i}`,
        content: `内容 ${i}`,
        createdAt: new Date(),
        updatedAt: new Date(),
      }

      articles.push(article)
    }

    await queryInterface.bulkInsert("Articles", articles, {})
  },

  async down(queryInterface, Sequelize) {
    await queryInterface.bulkDelete('Articles', null, {});
  }
};
